# Definitional proc to organize widgets for parameters.
proc init_gui { IPINST } {
  ipgui::add_param $IPINST -name "Component_Name"
  #Adding Page
  set Page_0 [ipgui::add_page $IPINST -name "Page 0"]
  set D [ipgui::add_param $IPINST -name "D" -parent ${Page_0}]
  set_property tooltip {Parameter to set the number of data lines} ${D}
  set N [ipgui::add_param $IPINST -name "N" -parent ${Page_0}]
  set_property tooltip {Parameter to set the number of channels} ${N}
  set DIFF_TERM [ipgui::add_param $IPINST -name "DIFF_TERM" -parent ${Page_0} -widget comboBox]
  set_property tooltip {Parameter to enable internal differential termination} ${DIFF_TERM}
  set USE_PLL [ipgui::add_param $IPINST -name "USE_PLL" -parent ${Page_0} -widget comboBox]
  set_property tooltip {Parameter to enable PLL use rather than MMCM use, note, PLL does not support BUFIO and BUFR} ${USE_PLL}
  set CLKIN_PERIOD [ipgui::add_param $IPINST -name "CLKIN_PERIOD" -parent ${Page_0}]
  set_property tooltip {clock period (ns) of input clock on clkin_p} ${CLKIN_PERIOD}
  ipgui::add_param $IPINST -name "REF_FREQ" -parent ${Page_0}
  set HIGH_PERFORMANCE_MODE [ipgui::add_param $IPINST -name "HIGH_PERFORMANCE_MODE" -parent ${Page_0} -widget comboBox]
  set_property tooltip {Parameter to set HIGH_PERFORMANCE_MODE of input delays to reduce jitter} ${HIGH_PERFORMANCE_MODE}
  set SAMPL_CLOCK [ipgui::add_param $IPINST -name "SAMPL_CLOCK" -parent ${Page_0} -widget comboBox]
  set_property tooltip {Parameter to set sampling clock buffer type, BUFIO, BUF_H, BUF_G} ${SAMPL_CLOCK}
  set PIXEL_CLOCK [ipgui::add_param $IPINST -name "PIXEL_CLOCK" -parent ${Page_0} -widget comboBox]
  set_property tooltip {Parameter to set pixel clock buffer type, BUF_R, BUF_H, BUF_G} ${PIXEL_CLOCK}
  set DATA_FORMAT [ipgui::add_param $IPINST -name "DATA_FORMAT" -parent ${Page_0} -widget comboBox]
  set_property tooltip {PER_CLOCK or PER_LINE data output formatting} ${DATA_FORMAT}


}

proc update_PARAM_VALUE.CLKIN_PERIOD { PARAM_VALUE.CLKIN_PERIOD } {
	# Procedure called to update CLKIN_PERIOD when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.CLKIN_PERIOD { PARAM_VALUE.CLKIN_PERIOD } {
	# Procedure called to validate CLKIN_PERIOD
	return true
}

proc update_PARAM_VALUE.D { PARAM_VALUE.D } {
	# Procedure called to update D when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.D { PARAM_VALUE.D } {
	# Procedure called to validate D
	return true
}

proc update_PARAM_VALUE.DATA_FORMAT { PARAM_VALUE.DATA_FORMAT } {
	# Procedure called to update DATA_FORMAT when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.DATA_FORMAT { PARAM_VALUE.DATA_FORMAT } {
	# Procedure called to validate DATA_FORMAT
	return true
}

proc update_PARAM_VALUE.DIFF_TERM { PARAM_VALUE.DIFF_TERM } {
	# Procedure called to update DIFF_TERM when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.DIFF_TERM { PARAM_VALUE.DIFF_TERM } {
	# Procedure called to validate DIFF_TERM
	return true
}

proc update_PARAM_VALUE.HIGH_PERFORMANCE_MODE { PARAM_VALUE.HIGH_PERFORMANCE_MODE } {
	# Procedure called to update HIGH_PERFORMANCE_MODE when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.HIGH_PERFORMANCE_MODE { PARAM_VALUE.HIGH_PERFORMANCE_MODE } {
	# Procedure called to validate HIGH_PERFORMANCE_MODE
	return true
}

proc update_PARAM_VALUE.N { PARAM_VALUE.N } {
	# Procedure called to update N when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.N { PARAM_VALUE.N } {
	# Procedure called to validate N
	return true
}

proc update_PARAM_VALUE.PIXEL_CLOCK { PARAM_VALUE.PIXEL_CLOCK } {
	# Procedure called to update PIXEL_CLOCK when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.PIXEL_CLOCK { PARAM_VALUE.PIXEL_CLOCK } {
	# Procedure called to validate PIXEL_CLOCK
	return true
}

proc update_PARAM_VALUE.REF_FREQ { PARAM_VALUE.REF_FREQ } {
	# Procedure called to update REF_FREQ when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.REF_FREQ { PARAM_VALUE.REF_FREQ } {
	# Procedure called to validate REF_FREQ
	return true
}

proc update_PARAM_VALUE.SAMPL_CLOCK { PARAM_VALUE.SAMPL_CLOCK } {
	# Procedure called to update SAMPL_CLOCK when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.SAMPL_CLOCK { PARAM_VALUE.SAMPL_CLOCK } {
	# Procedure called to validate SAMPL_CLOCK
	return true
}

proc update_PARAM_VALUE.USE_PLL { PARAM_VALUE.USE_PLL } {
	# Procedure called to update USE_PLL when any of the dependent parameters in the arguments change
}

proc validate_PARAM_VALUE.USE_PLL { PARAM_VALUE.USE_PLL } {
	# Procedure called to validate USE_PLL
	return true
}


proc update_MODELPARAM_VALUE.D { MODELPARAM_VALUE.D PARAM_VALUE.D } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.D}] ${MODELPARAM_VALUE.D}
}

proc update_MODELPARAM_VALUE.N { MODELPARAM_VALUE.N PARAM_VALUE.N } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.N}] ${MODELPARAM_VALUE.N}
}

proc update_MODELPARAM_VALUE.DIFF_TERM { MODELPARAM_VALUE.DIFF_TERM PARAM_VALUE.DIFF_TERM } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.DIFF_TERM}] ${MODELPARAM_VALUE.DIFF_TERM}
}

proc update_MODELPARAM_VALUE.CLKIN_PERIOD { MODELPARAM_VALUE.CLKIN_PERIOD PARAM_VALUE.CLKIN_PERIOD } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.CLKIN_PERIOD}] ${MODELPARAM_VALUE.CLKIN_PERIOD}
}

proc update_MODELPARAM_VALUE.REF_FREQ { MODELPARAM_VALUE.REF_FREQ PARAM_VALUE.REF_FREQ } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.REF_FREQ}] ${MODELPARAM_VALUE.REF_FREQ}
}

proc update_MODELPARAM_VALUE.HIGH_PERFORMANCE_MODE { MODELPARAM_VALUE.HIGH_PERFORMANCE_MODE PARAM_VALUE.HIGH_PERFORMANCE_MODE } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.HIGH_PERFORMANCE_MODE}] ${MODELPARAM_VALUE.HIGH_PERFORMANCE_MODE}
}

proc update_MODELPARAM_VALUE.USE_PLL { MODELPARAM_VALUE.USE_PLL PARAM_VALUE.USE_PLL } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.USE_PLL}] ${MODELPARAM_VALUE.USE_PLL}
}

proc update_MODELPARAM_VALUE.SAMPL_CLOCK { MODELPARAM_VALUE.SAMPL_CLOCK PARAM_VALUE.SAMPL_CLOCK } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.SAMPL_CLOCK}] ${MODELPARAM_VALUE.SAMPL_CLOCK}
}

proc update_MODELPARAM_VALUE.PIXEL_CLOCK { MODELPARAM_VALUE.PIXEL_CLOCK PARAM_VALUE.PIXEL_CLOCK } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.PIXEL_CLOCK}] ${MODELPARAM_VALUE.PIXEL_CLOCK}
}

proc update_MODELPARAM_VALUE.DATA_FORMAT { MODELPARAM_VALUE.DATA_FORMAT PARAM_VALUE.DATA_FORMAT } {
	# Procedure called to set VHDL generic/Verilog parameter value(s) based on TCL parameter value
	set_property value [get_property value ${PARAM_VALUE.DATA_FORMAT}] ${MODELPARAM_VALUE.DATA_FORMAT}
}

